import {Card, Row, Col, Typography, List} from "antd";
import Base from "@/pages/Province/SubjectDetail/components/Base";

// 图-培养过程
import Gmm02_1 from "./components/wx_components/Gmm02_1";
import Gmm02_2 from "./components/wx_components/Gmm02_2";
import Gmm02_3 from "./components/wx_components/Gmm02_3";
import Gmm02_4 from "./components/wx_components/Gmm02_4";
import Gmm02_5 from "./components/wx_components/Gmm02_5";
import Gmm02_6 from "./components/wx_components/Gmm02_6";
import Gmm02_7 from "./components/wx_components/Gmm02_7";
import Gmm02_8 from "./components/wx_components/Gmm02_8";
import {history} from "@@/core/history";
import {useEffect, useState} from "react";
import {
  Detail01Evaluation,
  Detail01Found,
  Detail01Influence,
  Detail01Upload,
  Detail02Docx
} from "@/services/Province/Dashboard";

export default (props) => {

  const urlArr = history.location.pathname.split('/')
  const school = urlArr[urlArr.length - 1]
  const subject = urlArr[urlArr.length - 2]
  const schoolSubject = school + '-' + subject
  const [uploadData, setuploadData] = useState([])
  const [reload, setReload] = useState(false)

  useEffect(() => {
    Detail02Docx({subject: schoolSubject}).then(res => {
      if (res.status === 0) {
        setuploadData(res.data)
      }
    })
  }, [reload])

  return <Base props={props}>
    <Row gutter={[24, 24]}>
      <Col span={24}><Card title="教书育人">
        <Card title={"思想政治教育特色与成效"}>
          <List
            bordered
            dataSource={uploadData}
            renderItem={item => (
              <List.Item>
                <div>
                  <Typography.Title level={4}> {item.title} </Typography.Title>
                  <p className="good-content-size">{item.content}</p>
                </div>
              </List.Item>
            )}
          />
        </Card>
      </Card></Col>
    </Row>
  </Base>
}
